home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10222 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  961 b 

  1. Path: news.umbc.edu!not-for-mail
  2. From: schlein@umbc.edu (Jonas J. Schlein)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help referencing an array of strings
  5. Date: 15 Mar 1996 19:57:59 -0500
  6. Organization: University of Maryland Baltimore County
  7. Message-ID: <4id3mn$677@umbc9.umbc.edu>
  8. References: <313C7F02.5D54@interramp.com> <4i5c74$80e@coranto.ucs.mun.ca>
  9. NNTP-Posting-Host: umbc9.umbc.edu
  10. NNTP-Posting-User: schlein
  11.  
  12. James A. Clifton <jclifton@interramp.com> wrote:
  13. >> typedef struct ss {
  14. >> /* some other data */
  15. >> char sa[N][M];
  16. >> } ss;
  17. >>
  18. >> ss s;
  19. >>
  20. >> Now how do I reference the Nth string??? 
  21.  
  22. Steve Austin <saustin@terra.nlnet.nf.ca> wrote:
  23. > s.sa[N]
  24.  
  25. Do I detect a former (current) Pascal programmer ;-). Surely you mean
  26. s.sa[N-1] since C accesses arrays from 0..n-1.
  27.  
  28. This has been brought to you by the sponsors Segmentation Fault and Core Dump.
  29. -- 
  30. "If it wasn't for C, we would be using BASI, PASAL, and OBOL."
  31.  
  32. Jonas J. Schlein  (schlein@gl.umbc.edu)
  33.